import { PureComponent } from "react";


const App = class extends PureComponent
{
    constructor()
    {
        super();
        this.state = {
            value:"hello world"
        }
    }

    hancleChange(event)
    {
        this.setState({
            value:event.target.value
        })
        console.log(this.state.value);
    }

    render()
    {
        return (
            <div>
                <input type="text" value={this.state.value} onChange={(event)=>this.hancleChange(event)} placeholder="请输入内容"/>
            </div>
        )
    }
}

export default App